section .data
str_c_lib: db "c library here", 0xa   ; LF ascii
str_c_lib_len equ $-str_c_lib

str_syscall: db "syscall here", 0xa
str_syscall_len equ $-str_syscall

section .text
global _start
_start:
    ;; c library write
    push str_c_lib_len
    push str_c_lib
    push 1   ; What does this mean ?
    call simu_write
    add esp, 12   ; recycle stack

    ;; system call
    mov eax, 4
    mov ebx, 1
    mov ecx, str_syscall
    mov edx, str_syscall_len
    int 0x80
    
    ;; exit
    mov eax, 1
    int 0x80

simu_write:
    push ebp
    mov ebp, esp
    mov eax, 4
    mov ebx, [ebp + 8]
    mov ecx, [ebp+12]
    mov edx, [ebp+16]
    int 0x80
    pop ebp
    ret

